const hooks = require('./lib/hooks.js')
const anti_emulator = require('./lib/anti-emulator.js')
Java.perform(function(){
	anti_emulator.bypass_build_properties()
	anti_emulator.bypass_phonenumber()
	anti_emulator.bypass_deviceid()
	anti_emulator.bypass_imsi()
	anti_emulator.bypass_operator_name()
	anti_emulator.bypass_sim_operator_name()
	anti_emulator.bypass_has_file()
	anti_emulator.bypass_processbuilder()
	anti_emulator.bypass_system_properties()
	hooks.to_string()
	hooks.url_init()
	hooks.dexclass_loader()
	hooks.hook_secrets()
	//Plugin code : Example
 	
	//Plugin code : FileInteraction
 	function fileHooks(){
    const File = Java.use("java.io.File")
    constructor = [
        File.$init.overload("java.lang.String"),
        File.$init.overload("java.lang.String", "java.lang.String")
    ]

    constructor[0].implementation = function(a0) {
        send("file: " + a0);
        var ret = constructor[0].call(this,a0);
        return ret;
    }

   constructor[1] = function(a0, a1) {
        send("file: " + a0 + "/" + a1);
        var ret = constructor[1].call(this,a0,a1);
        return ret;
    }
}

fileHooks()
	//Plugin code : SharedPreferences
 	function notifyNewSharedPreference() {
  Java.use('android.app.SharedPreferencesImpl$EditorImpl').putString.overload('java.lang.String', 'java.lang.String').implementation = function(k, v) {
    send("sharedprefs:"+k+"="+v)
    return this.putString(k, v);
  }
}


notifyNewSharedPreference()
	//Plugin code : String
 	
})